package com.health.healthSys.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.health.common.annotation.Excel;
import com.health.common.core.domain.BaseEntity;

/**
 * 用户饮食记录对象 health_diet
 *
 * @author maple
 * @date 2025-03-02
 */
public class HealthDiet extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 饮食记录ID */
    private String dietId;

    private Long deptId;

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    /** 用户名称 */
    private String userName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 食物名称 */
    @Excel(name = "食物名称")
    private String foodName;

    /** 预计摄入卡路里（千卡） */
    @Excel(name = "预计摄入卡路里", readConverterExp = "千=卡")
    private BigDecimal estimatedCalories;

    /** 记录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date recordTime;

    private String beginDate;  // 开始日期（非数据库字段）
    private String endDate;    // 结束日期（非数据库字段）

    // 添加Getter和Setter
    public String getBeginDate() { return beginDate; }
    public void setBeginDate(String beginDate) { this.beginDate = beginDate; }
    public String getEndDate() { return endDate; }
    public void setEndDate(String endDate) { this.endDate = endDate; }

    public void setDietId(String dietId)
    {
        this.dietId = dietId;
    }

    public String getDietId()
    {
        return dietId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setFoodName(String foodName)
    {
        this.foodName = foodName;
    }

    public String getFoodName()
    {
        return foodName;
    }
    public void setEstimatedCalories(BigDecimal estimatedCalories)
    {
        this.estimatedCalories = estimatedCalories;
    }

    public BigDecimal getEstimatedCalories()
    {
        return estimatedCalories;
    }
    public void setRecordTime(Date recordTime)
    {
        this.recordTime = recordTime;
    }

    public Date getRecordTime()
    {
        return recordTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dietId", getDietId())
            .append("userId", getUserId())
            .append("foodName", getFoodName())
            .append("estimatedCalories", getEstimatedCalories())
            .append("recordTime", getRecordTime())
            .toString();
    }
}
